package com.itqf.controller;

import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * projectName: rbac2103
 *
 * @author: 赵伟风
 * time: 2021/7/8 11:30
 * description: 班级模块的功能
 */
@Controller
@RequestMapping("class")
public class ClassController {


    @RequiresPermissions(value = "class:list")
    @GetMapping("list")
    public String list(){
        System.out.println("查看班级");

        return "class/list";
    }

    @RequiresPermissions(value = "班级测评")
    @GetMapping("test")
    public String test(){
        System.out.println("班级测评");

        return "class/test";
    }

    @RequiresRoles(value = {"讲师","主管"},logical = Logical.OR)
    @GetMapping("job")
    public String job(){
        System.out.println("班级就业");

        return "class/job";
    }


}
